<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<title>评论管理</title>
	<link rel="stylesheet" href="/Shopping/Public/Css/admin.css"/>
</head>
<body>
	<div id="header">
		<div class="top">
			<ul>
				<li><a href="<?php echo U('Login/loginOut');?>">❤退出❤</a></li>
				<li style="">欢迎您!<?php echo ($_SESSION['admin']['username']); ?></li>
			</ul>
		</div>
		<div class="h_main">
			<span>购物商城后台管理系统</span>
		</div>
	</div>
	<div id="middle"></div>
	<div class="main mt">
		<div class="m_left fl">
			<ul>
				<a href="<?php echo U('Goods/index');?>">
					<li>
					<span class="left_ico"></span>
					<b>商品管理</b>
					<span class="right_ico"></span>
					</li>
				</a>
				<a href="<?php echo U('Cate/index');?>">
					<li>
					<span class="left_ico"></span>
					<b>分类管理</b>
					<span class="right_ico"></span>
					</li>
				</a>
				<a href="<?php echo U('User/index');?>">
					<li>
					<span class="left_ico"></span>
					<b>用户管理</b>
					<span class="right_ico"></span>
					</li>
				</a>
				<a href="<?php echo U('Order/index');?>">
					<li>
					<span class="left_ico"></span>
					<b>订单管理</b>
					<span class="right_ico"></span>
					</li>
				</a>
				<a href="<?php echo U('Comments/index');?>">
					<li>
					<span class="left_ico"></span>
					<b>评论管理</b>
					<span class="right_ico"></span>
					</li>
				</a>
				<a href="<?php echo U('Adver/index');?>">
					<li>
					<span class="left_ico"></span>
					<b>广告管理</b>
					<span class="right_ico"></span>
					</li>
				</a>
			</ul>
		</div>
	<div class="m_right fr">
		<div class="mright_m">
		
	<div class="agoods_nav">
		<span>评论列表</span>
	</div>
	<table class="table" border="1" cellpadding="5" cellspacing="0" >			
			<tr bgcolor="#ccc" height="50">
				<th>编号</th>
				<th>买家</th>
				<th>评论内容</th>
				<th>评论时间</th>
				<th>审核</th>
				<th>卖家回复</th>
			</tr>
			<?php if(is_array($list)): foreach($list as $key=>$value): ?><tr>
					<td><?php echo ($value['id']); ?></td>
					<td><?php echo ($value['username']); ?></td>
					<td width="120"><?php echo ($value['text']); ?></td>
					<td width="120"><?php echo (date('Y年m月d日',$value['comtime'])); ?></td>
					<td width="100">
					<?php if($value['status'] == 1): ?><a href="<?php echo U('Comments/check',['id'=>$value['id'],'p'=>$p]);?>"><button style="width:80px;height:40px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;">显示</button></a>
					<?php else: ?>
					<a href="<?php echo U('Comments/check',['id'=>$value['id'],'p'=>$p]);?>"><button style="width:80px;height:40px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;">不显示</button></a><?php endif; ?>
						<!--<button>回复</button>-->
					</td>
					<td>
					<form action="<?php echo U('Comments/reply',['p'=>$p]);?>" method="post">
						<input type="hidden" name="id" value="<?php echo ($value['id']); ?>">
						<textarea name="text" style="width:180px;height:60px;margin-top:10px;"></textarea><br/>
						<br/>
						<button style="width:60px;height:30px;border:none;background:#6CCCCB;border-radius:10px;color:#2C6787;margin-left:100px;margin-bottom:10px;">提交</button>
					</form>
				</td>
				</tr><?php endforeach; endif; ?>
			<tr>
				<th colspan="6" height="50px">
					<?php echo ($page); ?>
				</th>
			</tr>
		</table>

		</div>
	</div>
</div>
<div class="clear"></div>
<div id="middle"></div>
<div id="footer">
	<p>Copyright&copy; 2016年 京ICP备11011334号</p>
</div>

</body>
</html>